package io.geekidea.boot.system.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.hwtx.form.util.FormUtil;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ProValueConfig {
    private String operator;
    private String value;
    private String property;

    public boolean isVariable() {
        return FormUtil.isVariable(value);
    }

    public String getVar() {
        if (isVariable()) {
            return value.substring(2, value.length() - 1);
        }
        return value;
    }
}